package com.wc.AlgoOJ_train.train1.c2.A115;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/12/29 12:21
 * @description 算菜价
 * http://43.138.190.70:8888/p/A115
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double sum = 0;
        while (sc.hasNext()) {
            String name = sc.next();
            if (name.equals("#")){
                break;
            }
            double a = sc.nextDouble();
            double b = sc.nextDouble();
            sum += a * b;
        }
        System.out.printf("%.1f", round(sum, 1));
    }

    static double round(double num, int radix) {
        int r = (int) Math.max(10, radix);
        return 1.0 * Math.round(r * num) / r;
    }
}
